package me.zhengjie.repository;

import me.zhengjie.dto.sqlServer.Pallet;
import me.zhengjie.dto.sqlServer.UnbindingOrder;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface UnbindingOrderRepository  extends JpaRepository<UnbindingOrder, Integer>, JpaSpecificationExecutor<UnbindingOrder> {

    @Query("select pi from UnbindingOrder pi where pi.potId=?1 and pi.pressMachineId=?2 order by pi.id desc")
    UnbindingOrder findUnbindingOrderByPotIdAndPressMachineId(Integer potId,Integer pressMachineId);

    UnbindingOrder findUnbindingOrderByUnbindingOrderCode(String unbindingOrderCode);

    List<UnbindingOrder> findUnbindingOrderByStationName(String stationName);
}
